<?php
$hidden = array();
$opt = array('name' => 'newsarticle', 'id' => 'newsarticle');
echo '<a href="'.$baseurl.'index.php/news"><img class="btnimg" src="'.$baseurl.'public/images/close.png" align="right" alt="close" border="0" /></a>';
echo form_open($baseurl.'index.php/news/create', $opt ,$hidden);
echo form_fieldset('<h2> Create a news item </h2>');


echo "<div>";
echo validation_errors();
echo "</div>";
 ?>

<table>
    <tr>
        <td width="100px" >
<?php   echo form_label('Title *', 'title'); 
        //echo form_error('Name'); 
        $titlec = array('name' => 'title', 
               'id' => 'title',  
               'maxlength'   => '400',
               'value'       => $title,
              'style'       => 'width: 500px' ); ?>  </td>
        <td width="600px" ><?php echo form_input($titlec); echo '<br>'.form_error('title');?>       </td>
    </tr>
    <tr>
        <td>
<?php   echo form_label('Article *', 'article'); 
        //echo form_error('Name'); 
        $articlec = array('name' => 'article', 
               'id' => 'article',  
               'col'   => '150',
               'rows' => '20',
               'value' => $article ); ?>  </td>
        <td  ><?php echo form_textarea($articlec); echo '<br>'.form_error('article');?>       </td>
    </tr>
    <tr>
    <tr>
        <td>
<?php   echo form_label('Article Type *', 'atype'); ?>
        </td>
        <td  ><?php 
                echo form_checkbox('news', 'news', TRUE); 
                echo form_checkbox('incident', 'incident', FALSE);
                echo form_checkbox('event', 'event', FALSE);
                ?>       </td>
    </tr>
    <tr>    
        <td colspan="2" align="right" > 
        <?php 
            echo form_submit('newnews', 'Save');
            echo form_reset('reset', 'Reset');
        ?>  
   </tr>

	

<?=form_fieldset_close()?>
<?=form_close();?>